<?php $id="form_".uniqid();?>
<table id="<?php echo $id;?>"></table>
<script>
$("#<?php echo $id;?>").DataSource({url:'member/getagent',
	fields:[[
		{field:'id',      title:'ID', align:'center',       width:60,sortable:true},
		{field:'t1',title:'状态 ', align:'center',     width:50, sortable:false},
		{field:'t2',title:'名称 ', align:'center',     width:100, sortable:true},	
		{field:'t3',title:'帐号', align:'center',     width:120, sortable:true},
		{field:'t4',title:'登入帐号', align:'center',     width:120},	
		{field:'t5',title:'会员数', align:'center',  width:100,  sortable:true},	
		{field:'t6',title:'最后登录IP',align:'center', width:150,  sortable:true},	
		{field:'t7',title:'新增日期', align:'center',  width:120,  sortable:true},
		{field:'t7',title:'彩票占成',align:'center', width:120,  sortable:true},
		{field:'t8',title:'当前状况', align:'center',      width:80,  sortable:true},	
		{field:'aa',      title:'功能',align:'center', width:370,sortable:false,formatter:function(v,r){
			return '<a herf="#" class="btn btn-danger btn-xs" onclick=Core.confirm("<?php echo $id;?>",1,"asd","确定停用该会员使用?")>停用</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick="Core.dialog(\'分层\',\'order/edit\',function(){},true,false)">日志</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick="Core.dialog(\'代理资料设定\',\'member/agent_info\',function(){},true,false)">修改</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick="Core.dialog(\'注册会员优惠设定\',\'member/member_discount\',function(){},true,false)">设定</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick=Core.confirm("<?php echo $id;?>",1,"asd","确定停用该会员使用?")>优惠</a>&nbsp;';
		}}
    ]], tools:[
	{instant:false},
    <?php if(in_array('ADD',$auth)){?>
    {text:"新增",iconCls:"icon-add",handler:function(){
        $('#<?php echo $id?>').DataSource('add',{title:'新增代理子账号',get:'member/editagent',full:false});
    }},
    <?php }?>
	<?php if(in_array('EDIT',$auth)){?>
	{text:"编辑",iconCls:"icon-edit",handler:function(){
		$('#<?php echo $id?>').DataSource('edit',{title:'查看会员',get:'member/editagent',full:false});
	}},
	<?php }?>
	<?php if(in_array('EXPORT',$auth)){?>
	{text:'导出',iconCls:'icon-excel',handler:function(){
			var params=$('#<?php echo $id?>').DataSource('queryParams');
			Core.Export(params,'orderlist/export');
	}},
	<?php }?>
	<?php if(in_array('DELETE',$auth)){ ?>
	{text:"删除",iconCls:"icon-remove",handler:function(){
		$('#<?php echo $id?>').DataSource('remove',{get:'member/deluser'});
	}},
	<?php }?>
	'|',
		{type:'combobox',text:'状态',width:100,name:'verify_status',value:'', items:'<option value="">所有记录</option><option value="1">启用</option><option value="2">停用</option>'},
		{type:'combobox',text:'',width:100,name:'verify_status',value:'', items:'<option value="">所有记录</option><option value="1">帐号</option><option value="2">注册IP</option><option value="3">申请中</option><option value="4">退回</option><option value="5">拒绝</option>'},
		{type:'textbox', text:'-', width:100,name:'zaddtime'},
		{text:"搜索", iconCls:"icon-search", handler:function(){
			$('#<?php echo $id?>').DataSource('search');
		}},
	'-'
	],
	footer:true,
	success:function(){

	}
});
</script>

